KERNEL_DIR := ../CDM530/linux/src/
CROSS_COMPILE := mipsel-linux-uclibc-
TARGET := helloworld.ko

obj-m += helloworld.o
helloworld-y += hello.o
helloworld-y += test.o

all:
	make -C $(KERNEL_DIR) SUBDIRS=$(shell pwd) modules   
	#make -C $(KERNEL_DIR)  ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) SUBDIRS=$(shell pwd) modules   
	$(CROSS_COMPILE)strip -g -S -d $(TARGET)

clean:
	make -C $(KERNEL_DIR) CROSS_COMPILE=$(CROSS_COMPILE) SUBDIRS=$(shell pwd) clean
	rm -f *.symvers
	#rm -f *.o *.ko
